<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
     请输入小写的英文<input type="text" onchange="toUpperCase()" id="text_1"></input><br>
	 请输入大写的英文<input type="text" onchange="toLowerCase()" id="text_2"></input>
 </body>
 <script>
    var text_1 = document.getElementById("text_1");
	var text_2 = document.getElementById("text_2");
    function toUpperCase(){
	  var up = text_1.value.toUpperCase();
	  text_1.value = up;
	}
    function toLowerCase(){
	  var lo = text_2.value.toLowerCase();
	  text_2.value = lo;
	}
 </script>
</html>
